package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;


/**
 * The persistent class for the emp_education_history database table.
 * 
 */
@Entity
@Table(name="emp_education_history")
@NamedQuery(name="EmpEducationHistory.findAll", query="SELECT e FROM EmpEducationHistory e")
public class EmpEducationHistory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;

	private String address;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	@Column(name="begin_date")
	private Date beginDate;

	@Column(name="contact_person")
	private String contactPerson;

	@Column(name="contact_tel")
	private String contactTel;

	private String education;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	@Column(name="end_date")
	private Date endDate;

	private String major;

	private String remark;

	@Column(name="school_name")
	private String schoolName;

	//bi-directional one-to-one association to Emp
	@ManyToOne
	@JSONField(serialize=false)
	@JoinColumn(name="emp_id")
	private Emp emp;

	public EmpEducationHistory() {
	}


	@Override
	public String toString() {
		return "EmpEducationHistory [id=" + id + ", address=" + address + ", beginDate=" + beginDate
				+ ", contactPerson=" + contactPerson + ", contactTel=" + contactTel + ", education=" + education
				+ ", endDate=" + endDate + ", major=" + major + ", remark=" + remark + ", schoolName=" + schoolName
				+ "]";
	}


	public EmpEducationHistory(String address, Date beginDate, String contactPerson, String contactTel,
			String education, Date endDate, String major, String remark, String schoolName) {
		super();
		this.address = address;
		this.beginDate = beginDate;
		this.contactPerson = contactPerson;
		this.contactTel = contactTel;
		this.education = education;
		this.endDate = endDate;
		this.major = major;
		this.remark = remark;
		this.schoolName = schoolName;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getContactTel() {
		return this.contactTel;
	}

	public void setContactTel(String contactTel) {
		this.contactTel = contactTel;
	}

	public String getEducation() {
		return this.education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getMajor() {
		return this.major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getSchoolName() {
		return this.schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

}